#pragma once

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#define MySize 1024
struct MyFILE
{
 // unsigned int flgs;
  int fileno;
  char cache[MySize];//缓冲区
  int cap;//缓冲区存储空间
  int pos;//下一个数据要储存的位置
};
typedef struct MyFILE MyFILE;
MyFILE* MyFopen(const char* filename,const char* mode);
size_t MyWrite(MyFILE* f,const char* data,size_t length);
void MyFlush(MyFILE* f);
void MyClose(MyFILE* f);


